 

import javax.swing.*;
import Control.*;
import Model.*;

/**
 *
 * @author Stefan
 */
public class GUI extends javax.swing.JFrame {

    private static ProductController proCtl = ProductController.getInstance();
    private static AssociateController assCtl = AssociateController.getInstance();
    private static TradeController tradeCtl = TradeController.getInstance();
    private String proID = "";
    //private DefaultListModel listSale = new DefaultListModel();

    /** Creates new form GUI */
    public GUI()
    {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jInternalFrame1 = new javax.swing.JInternalFrame();
        dialogAbout = new javax.swing.JDialog();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jOptionPane1 = new javax.swing.JOptionPane();
        dialogProAdd = new javax.swing.JDialog();
        lblProAddHeader = new javax.swing.JLabel();
        lblProAddByggemarked = new javax.swing.JLabel();
        txtProAddByggemarked = new javax.swing.JTextField();
        lblProAddTommerhandel = new javax.swing.JLabel();
        txtProAddTommerhandel = new javax.swing.JTextField();
        lblProAddLeverandor = new javax.swing.JLabel();
        txtProAddLeverandor = new javax.swing.JTextField();
        btnProAddCancel = new javax.swing.JButton();
        btnProAddOk = new javax.swing.JButton();
        dialogProMove = new javax.swing.JDialog();
        lblProMoveByggemarked = new javax.swing.JLabel();
        lblProMoveByggemarkedQuantity = new javax.swing.JLabel();
        lblProMoveTommerhandelQuantity = new javax.swing.JLabel();
        lblProMoveTommerhandel = new javax.swing.JLabel();
        lblProMoveLeverandorQuantity = new javax.swing.JLabel();
        lblProMoveLeverandor = new javax.swing.JLabel();
        lblProMoveQuantity = new javax.swing.JLabel();
        txtProMoveQuantity = new javax.swing.JTextField();
        lblProMoveFrom = new javax.swing.JLabel();
        lblProMoveTo = new javax.swing.JLabel();
        dropProMoveFrom = new javax.swing.JComboBox();
        dropProMoveTo = new javax.swing.JComboBox();
        btnProMoveCancel = new javax.swing.JButton();
        btnProMoveOk = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jPanel38 = new javax.swing.JPanel();
        txtSaleFind = new javax.swing.JTextField();
        btnSalesSearch = new javax.swing.JButton();
        lblSalesStatus = new javax.swing.JLabel();
        jPanel62 = new javax.swing.JPanel();
        btnSalesDelete = new javax.swing.JButton();
        btnSalesCreate = new javax.swing.JButton();
        btnSalesUpdate = new javax.swing.JButton();
        btnSalesPrint = new javax.swing.JButton();
        jPanel63 = new javax.swing.JPanel();
        jLabel50 = new javax.swing.JLabel();
        txtSalesItemId = new javax.swing.JTextField();
        btnSaleAdd = new javax.swing.JButton();
        txtSaleQuan = new javax.swing.JTextField();
        jLabel6 = new javax.swing.JLabel();
        jPanel64 = new javax.swing.JPanel();
        txtSaleEmpId = new javax.swing.JTextField();
        jPanel65 = new javax.swing.JPanel();
        list1 = new java.awt.List();
        jPanel66 = new javax.swing.JPanel();
        txtSaleCusId = new javax.swing.JTextField();
        jPanel25 = new javax.swing.JPanel();
        txtSaleID = new javax.swing.JTextField();
        jPanel28 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jPanel36 = new javax.swing.JPanel();
        txtOrFind = new javax.swing.JTextField();
        btnOrSearch = new javax.swing.JButton();
        lblOrStatus = new javax.swing.JLabel();
        jPanel39 = new javax.swing.JPanel();
        btnOrDelete = new javax.swing.JButton();
        btnOrCreate = new javax.swing.JButton();
        btnOrUpdate = new javax.swing.JButton();
        btnOrPrint = new javax.swing.JButton();
        jPanel40 = new javax.swing.JPanel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        txtOrItemId = new javax.swing.JTextField();
        txtOrQuantity = new javax.swing.JTextField();
        btnOrAdd = new javax.swing.JButton();
        jPanel41 = new javax.swing.JPanel();
        txtOrEmpId = new javax.swing.JTextField();
        jPanel42 = new javax.swing.JPanel();
        list2 = new java.awt.List();
        jPanel43 = new javax.swing.JPanel();
        txtOrCusId = new javax.swing.JTextField();
        jPanel44 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        txtOrAddress = new javax.swing.JTextField();
        txtOrDate = new javax.swing.JTextField();
        jPanel30 = new javax.swing.JPanel();
        txtOrID = new javax.swing.JTextField();
        jPanel29 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        jPanel46 = new javax.swing.JPanel();
        txtRentSearch = new javax.swing.JTextField();
        btnRentSearch = new javax.swing.JButton();
        lblRentStatus = new javax.swing.JLabel();
        jPanel47 = new javax.swing.JPanel();
        btnRentDelete = new javax.swing.JButton();
        btnRentCreate = new javax.swing.JButton();
        btnRentUpdate = new javax.swing.JButton();
        btnRentPrint = new javax.swing.JButton();
        jPanel48 = new javax.swing.JPanel();
        jLabel40 = new javax.swing.JLabel();
        jLabel41 = new javax.swing.JLabel();
        txtItemId = new javax.swing.JTextField();
        txtRentRentalPrice = new javax.swing.JTextField();
        btnItemAdd = new javax.swing.JButton();
        jPanel49 = new javax.swing.JPanel();
        txtRentEmpId = new javax.swing.JTextField();
        jPanel50 = new javax.swing.JPanel();
        bliverændret = new javax.swing.JTextField();
        jPanel51 = new javax.swing.JPanel();
        txtRentCusId = new javax.swing.JTextField();
        jPanel52 = new javax.swing.JPanel();
        jLabel42 = new javax.swing.JLabel();
        jLabel43 = new javax.swing.JLabel();
        txtRentFromDate = new javax.swing.JTextField();
        txtRentToDate = new javax.swing.JTextField();
        jPanel53 = new javax.swing.JPanel();
        jLabel44 = new javax.swing.JLabel();
        jLabel45 = new javax.swing.JLabel();
        txtRentAddress = new javax.swing.JTextField();
        txtRentDate = new javax.swing.JTextField();
        jPanel2 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        txtProSearch = new javax.swing.JTextField();
        btnProSearch = new javax.swing.JButton();
        lblProStatus = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        btnProDelete = new javax.swing.JButton();
        btnProCreate = new javax.swing.JButton();
        btnProUpdate = new javax.swing.JButton();
        btnProMove = new javax.swing.JButton();
        jButton1 = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel11 = new javax.swing.JLabel();
        txtProID = new javax.swing.JTextField();
        txtProRegPrice = new javax.swing.JTextField();
        txtProDiscount = new javax.swing.JTextField();
        lblProSalesPrice = new javax.swing.JLabel();
        jPanel10 = new javax.swing.JPanel();
        txtProName = new javax.swing.JTextField();
        jPanel11 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        txtProSerial = new javax.swing.JTextField();
        txtProRentPrice = new javax.swing.JTextField();
        txtProStatus = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        jLabel14 = new javax.swing.JLabel();
        jPanel12 = new javax.swing.JPanel();
        jLabel18 = new javax.swing.JLabel();
        jLabel17 = new javax.swing.JLabel();
        jLabel19 = new javax.swing.JLabel();
        jLabel20 = new javax.swing.JLabel();
        jLabel21 = new javax.swing.JLabel();
        txtProMinStock = new javax.swing.JTextField();
        lblProByggemarked = new javax.swing.JLabel();
        lblProTommerhandel = new javax.swing.JLabel();
        lblProLeverandor = new javax.swing.JLabel();
        lblProTotal = new javax.swing.JLabel();
        lblProStockstatus = new javax.swing.JLabel();
        jPanel13 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        txtProDesc = new javax.swing.JTextArea();
        jPanel3 = new javax.swing.JPanel();
        jPanel8 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        txtCusSearch = new javax.swing.JTextField();
        btnCusSearch = new javax.swing.JButton();
        lblCusStatus = new javax.swing.JLabel();
        jPanel15 = new javax.swing.JPanel();
        jButton8 = new javax.swing.JButton();
        jButton9 = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jPanel16 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jLabel16 = new javax.swing.JLabel();
        jLabel22 = new javax.swing.JLabel();
        jLabel23 = new javax.swing.JLabel();
        txtCusId = new javax.swing.JTextField();
        txtCusName = new javax.swing.JTextField();
        txtCusAddress = new javax.swing.JTextField();
        txtCusCompany = new javax.swing.JTextField();
        txtCusDiscount = new javax.swing.JTextField();
        txtCusCredit = new javax.swing.JTextField();
        jLabel24 = new javax.swing.JLabel();
        jLabel25 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        btnCusDelete = new javax.swing.JButton();
        btnCusCreate = new javax.swing.JButton();
        btnCusUpdate = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jPanel18 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        txtSupSearch = new javax.swing.JTextField();
        btnSupSearch = new javax.swing.JButton();
        lblSupStatus = new javax.swing.JLabel();
        jPanel21 = new javax.swing.JPanel();
        jLabel26 = new javax.swing.JLabel();
        jLabel27 = new javax.swing.JLabel();
        jLabel28 = new javax.swing.JLabel();
        jLabel29 = new javax.swing.JLabel();
        txtSupId = new javax.swing.JTextField();
        txtSupName = new javax.swing.JTextField();
        txtSupAddress = new javax.swing.JTextField();
        txtSupCompany = new javax.swing.JTextField();
        jPanel22 = new javax.swing.JPanel();
        btnSupDelete = new javax.swing.JButton();
        btnSupCreate = new javax.swing.JButton();
        btnSupUpdate = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jPanel23 = new javax.swing.JPanel();
        jPanel24 = new javax.swing.JPanel();
        txtEmpSearch = new javax.swing.JTextField();
        btnEmpSearch = new javax.swing.JButton();
        lblEmpStatus = new javax.swing.JLabel();
        jPanel26 = new javax.swing.JPanel();
        jLabel30 = new javax.swing.JLabel();
        jLabel31 = new javax.swing.JLabel();
        jLabel32 = new javax.swing.JLabel();
        jLabel33 = new javax.swing.JLabel();
        txtEmpID = new javax.swing.JTextField();
        txtEmpName = new javax.swing.JTextField();
        txtEmpAddress = new javax.swing.JTextField();
        txtEmpDepart = new javax.swing.JTextField();
        jPanel27 = new javax.swing.JPanel();
        btnEmpDelete = new javax.swing.JButton();
        btnEmpCreate = new javax.swing.JButton();
        btnEmpUpdate = new javax.swing.JButton();
        jMenuBar1 = new javax.swing.JMenuBar();
        menuBar = new javax.swing.JMenu();
        menuHelp = new javax.swing.JMenuItem();
        menuAbout = new javax.swing.JMenuItem();
        menuExit = new javax.swing.JMenuItem();

        jInternalFrame1.setVisible(true);

        javax.swing.GroupLayout jInternalFrame1Layout = new javax.swing.GroupLayout(jInternalFrame1.getContentPane());
        jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
        jInternalFrame1Layout.setHorizontalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 6, Short.MAX_VALUE)
        );
        jInternalFrame1Layout.setVerticalGroup(
            jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 52, Short.MAX_VALUE)
        );

        dialogAbout.setTitle("About");
        dialogAbout.setAlwaysOnTop(true);
        dialogAbout.setMinimumSize(new java.awt.Dimension(317, 147));
        dialogAbout.setModal(true);
        dialogAbout.setResizable(false);

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 12));
        jLabel1.setText("Vestbjerg Byggecenter A/S");

        jLabel2.setText("1. Semester projekt opgave - DM72 - Gruppe 1");

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 10));
        jLabel3.setText("Made by: Dan, Fogh, Jimmi, Tommy");

        javax.swing.GroupLayout dialogAboutLayout = new javax.swing.GroupLayout(dialogAbout.getContentPane());
        dialogAbout.getContentPane().setLayout(dialogAboutLayout);
        dialogAboutLayout.setHorizontalGroup(
            dialogAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogAboutLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(dialogAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel1)
                    .addComponent(jLabel2))
                .addContainerGap(82, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dialogAboutLayout.createSequentialGroup()
                .addContainerGap(143, Short.MAX_VALUE)
                .addComponent(jLabel3)
                .addContainerGap())
        );
        dialogAboutLayout.setVerticalGroup(
            dialogAboutLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogAboutLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 77, Short.MAX_VALUE)
                .addComponent(jLabel3)
                .addContainerGap())
        );

        dialogProAdd.setTitle("Vestbjerg - Add goods");
        dialogProAdd.setMinimumSize(new java.awt.Dimension(300, 250));

        lblProAddHeader.setText("Enter the additional goods at the right location");

        lblProAddByggemarked.setText("Byggemarked");

        lblProAddTommerhandel.setText("Tømmerhandel");

        lblProAddLeverandor.setText("Leverandør");

        txtProAddLeverandor.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtProAddLeverandorActionPerformed(evt);
            }
        });

        btnProAddCancel.setText("Cancel");
        btnProAddCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProAddCancelActionPerformed(evt);
            }
        });

        btnProAddOk.setText("Ok");
        btnProAddOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProAddOkActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout dialogProAddLayout = new javax.swing.GroupLayout(dialogProAdd.getContentPane());
        dialogProAdd.getContentPane().setLayout(dialogProAddLayout);
        dialogProAddLayout.setHorizontalGroup(
            dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogProAddLayout.createSequentialGroup()
                .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(dialogProAddLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblProAddByggemarked)
                            .addComponent(lblProAddTommerhandel)
                            .addComponent(lblProAddLeverandor))
                        .addGap(27, 27, 27)
                        .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtProAddLeverandor, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                            .addComponent(txtProAddTommerhandel, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                            .addComponent(txtProAddByggemarked, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)))
                    .addGroup(dialogProAddLayout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(lblProAddHeader))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dialogProAddLayout.createSequentialGroup()
                        .addContainerGap(105, Short.MAX_VALUE)
                        .addComponent(btnProAddOk)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnProAddCancel)))
                .addContainerGap())
        );

        dialogProAddLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnProAddCancel, btnProAddOk});

        dialogProAddLayout.setVerticalGroup(
            dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogProAddLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblProAddHeader)
                .addGap(18, 18, 18)
                .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProAddByggemarked)
                    .addComponent(txtProAddByggemarked, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProAddTommerhandel)
                    .addComponent(txtProAddTommerhandel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProAddLeverandor)
                    .addComponent(txtProAddLeverandor, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 41, Short.MAX_VALUE)
                .addGroup(dialogProAddLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnProAddCancel)
                    .addComponent(btnProAddOk))
                .addContainerGap())
        );

        dialogProMove.setTitle("Vestbjerg - Move goods");
        dialogProMove.setMinimumSize(new java.awt.Dimension(300, 250));

        lblProMoveByggemarked.setText("Byggemarked");

        lblProMoveByggemarkedQuantity.setText("Empty");

        lblProMoveTommerhandelQuantity.setText("Empty");

        lblProMoveTommerhandel.setText("Tømmerhandel");

        lblProMoveLeverandorQuantity.setText("Empty");

        lblProMoveLeverandor.setText("Leverandør");

        lblProMoveQuantity.setText("Enter the amount to move");

        lblProMoveFrom.setText("Move the goods from");

        lblProMoveTo.setText("Move the goods to");

        dropProMoveFrom.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Byggemarked", "Tømmerhandel", "Leverandør" }));
        dropProMoveFrom.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dropProMoveFromActionPerformed(evt);
            }
        });

        dropProMoveTo.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Byggemarked", "Tømmerhandel", "Leverandør" }));
        dropProMoveTo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                dropProMoveToActionPerformed(evt);
            }
        });

        btnProMoveCancel.setText("Cancel");
        btnProMoveCancel.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProMoveCancelActionPerformed(evt);
            }
        });

        btnProMoveOk.setText("Ok");
        btnProMoveOk.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProMoveOkActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout dialogProMoveLayout = new javax.swing.GroupLayout(dialogProMove.getContentPane());
        dialogProMove.getContentPane().setLayout(dialogProMoveLayout);
        dialogProMoveLayout.setHorizontalGroup(
            dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogProMoveLayout.createSequentialGroup()
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(dialogProMoveLayout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblProMoveByggemarked)
                            .addComponent(lblProMoveTommerhandel)
                            .addComponent(lblProMoveLeverandor)
                            .addComponent(lblProMoveQuantity)
                            .addComponent(lblProMoveFrom)
                            .addComponent(lblProMoveTo))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(txtProMoveQuantity, javax.swing.GroupLayout.DEFAULT_SIZE, 123, Short.MAX_VALUE)
                            .addComponent(dropProMoveFrom, 0, 123, Short.MAX_VALUE)
                            .addComponent(dropProMoveTo, 0, 123, Short.MAX_VALUE)))
                    .addGroup(dialogProMoveLayout.createSequentialGroup()
                        .addGap(142, 142, 142)
                        .addComponent(lblProMoveByggemarkedQuantity))
                    .addGroup(dialogProMoveLayout.createSequentialGroup()
                        .addGap(142, 142, 142)
                        .addComponent(lblProMoveTommerhandelQuantity))
                    .addGroup(dialogProMoveLayout.createSequentialGroup()
                        .addGap(142, 142, 142)
                        .addComponent(lblProMoveLeverandorQuantity))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, dialogProMoveLayout.createSequentialGroup()
                        .addContainerGap(129, Short.MAX_VALUE)
                        .addComponent(btnProMoveOk)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnProMoveCancel)))
                .addContainerGap())
        );

        dialogProMoveLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {dropProMoveFrom, dropProMoveTo, txtProMoveQuantity});

        dialogProMoveLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnProMoveCancel, btnProMoveOk});

        dialogProMoveLayout.setVerticalGroup(
            dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(dialogProMoveLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProMoveByggemarked)
                    .addComponent(lblProMoveByggemarkedQuantity))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProMoveTommerhandel)
                    .addComponent(lblProMoveTommerhandelQuantity))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProMoveLeverandor)
                    .addComponent(lblProMoveLeverandorQuantity))
                .addGap(18, 18, 18)
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProMoveQuantity)
                    .addComponent(txtProMoveQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProMoveFrom)
                    .addComponent(dropProMoveFrom, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblProMoveTo)
                    .addComponent(dropProMoveTo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 46, Short.MAX_VALUE)
                .addGroup(dialogProMoveLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnProMoveCancel)
                    .addComponent(btnProMoveOk))
                .addContainerGap())
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Vestbjerg Byggecenter A/S");
        setResizable(false);

        jTabbedPane1.setBackground(new java.awt.Color(153, 153, 153));
        jTabbedPane1.setName("Find sale"); // NOI18N

        jPanel37.setPreferredSize(new java.awt.Dimension(661, 642));

        jPanel38.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtSaleFind.setText("Find order");
        txtSaleFind.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSaleFindActionPerformed(evt);
            }
        });

        btnSalesSearch.setText("Search");
        btnSalesSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalesSearchActionPerformed(evt);
            }
        });

        lblSalesStatus.setText("Status:");

        javax.swing.GroupLayout jPanel38Layout = new javax.swing.GroupLayout(jPanel38);
        jPanel38.setLayout(jPanel38Layout);
        jPanel38Layout.setHorizontalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtSaleFind, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel38Layout.createSequentialGroup()
                        .addComponent(btnSalesSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblSalesStatus)))
                .addContainerGap())
        );
        jPanel38Layout.setVerticalGroup(
            jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel38Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSaleFind, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel38Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnSalesSearch)
                    .addComponent(lblSalesStatus))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel62.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        jPanel62.setPreferredSize(new java.awt.Dimension(641, 58));

        btnSalesDelete.setText("Delete");
        btnSalesDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalesDeleteActionPerformed(evt);
            }
        });

        btnSalesCreate.setText("Create");
        btnSalesCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalesCreateActionPerformed(evt);
            }
        });

        btnSalesUpdate.setText("Update");
        btnSalesUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSalesUpdateActionPerformed(evt);
            }
        });

        btnSalesPrint.setText("Print");

        javax.swing.GroupLayout jPanel62Layout = new javax.swing.GroupLayout(jPanel62);
        jPanel62.setLayout(jPanel62Layout);
        jPanel62Layout.setHorizontalGroup(
            jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel62Layout.createSequentialGroup()
                .addContainerGap(337, Short.MAX_VALUE)
                .addComponent(btnSalesPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSalesUpdate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSalesCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSalesDelete)
                .addContainerGap())
        );
        jPanel62Layout.setVerticalGroup(
            jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel62Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel62Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSalesDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnSalesCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnSalesUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .addComponent(btnSalesPrint))
                .addContainerGap())
        );

        jPanel63.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Item", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel50.setText("ID");

        btnSaleAdd.setText("Add");
        btnSaleAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaleAddActionPerformed(evt);
            }
        });

        jLabel6.setText("Quantity");

        javax.swing.GroupLayout jPanel63Layout = new javax.swing.GroupLayout(jPanel63);
        jPanel63.setLayout(jPanel63Layout);
        jPanel63Layout.setHorizontalGroup(
            jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel63Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jLabel50))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addGroup(jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtSalesItemId)
                    .addComponent(txtSaleQuan, javax.swing.GroupLayout.DEFAULT_SIZE, 159, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSaleAdd)
                .addContainerGap())
        );
        jPanel63Layout.setVerticalGroup(
            jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel63Layout.createSequentialGroup()
                .addGroup(jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel63Layout.createSequentialGroup()
                        .addGroup(jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel50)
                            .addComponent(txtSalesItemId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jPanel63Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtSaleQuan, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel6)))
                    .addGroup(jPanel63Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(btnSaleAdd)))
                .addContainerGap())
        );

        jPanel64.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Employee ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtSaleEmpId.setText("Your ID");

        javax.swing.GroupLayout jPanel64Layout = new javax.swing.GroupLayout(jPanel64);
        jPanel64.setLayout(jPanel64Layout);
        jPanel64Layout.setHorizontalGroup(
            jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel64Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSaleEmpId, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel64Layout.setVerticalGroup(
            jPanel64Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel64Layout.createSequentialGroup()
                .addComponent(txtSaleEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jPanel65.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Terminal", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        javax.swing.GroupLayout jPanel65Layout = new javax.swing.GroupLayout(jPanel65);
        jPanel65.setLayout(jPanel65Layout);
        jPanel65Layout.setHorizontalGroup(
            jPanel65Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel65Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(list1, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel65Layout.setVerticalGroup(
            jPanel65Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel65Layout.createSequentialGroup()
                .addComponent(list1, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel66.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Customer ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        javax.swing.GroupLayout jPanel66Layout = new javax.swing.GroupLayout(jPanel66);
        jPanel66.setLayout(jPanel66Layout);
        jPanel66Layout.setHorizontalGroup(
            jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel66Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSaleCusId, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel66Layout.setVerticalGroup(
            jPanel66Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel66Layout.createSequentialGroup()
                .addComponent(txtSaleCusId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel25.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Sale ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        javax.swing.GroupLayout jPanel25Layout = new javax.swing.GroupLayout(jPanel25);
        jPanel25.setLayout(jPanel25Layout);
        jPanel25Layout.setHorizontalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSaleID, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel25Layout.setVerticalGroup(
            jPanel25Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel25Layout.createSequentialGroup()
                .addComponent(txtSaleID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel37Layout = new javax.swing.GroupLayout(jPanel37);
        jPanel37.setLayout(jPanel37Layout);
        jPanel37Layout.setHorizontalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel37Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel38, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel37Layout.createSequentialGroup()
                        .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel64, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel63, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanel66, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel65, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel62, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel37Layout.setVerticalGroup(
            jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel37Layout.createSequentialGroup()
                .addComponent(jPanel38, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel66, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel25, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel37Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel37Layout.createSequentialGroup()
                        .addComponent(jPanel64, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel63, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel65, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(44, 44, 44)
                .addComponent(jPanel62, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(587, 587, 587))
        );

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 661, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 653, Short.MAX_VALUE)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel37, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab("  Sales  ", jPanel1);

        jPanel36.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtOrFind.setText("Find order");
        txtOrFind.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtOrFindActionPerformed(evt);
            }
        });

        btnOrSearch.setText("Search");
        btnOrSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOrSearchActionPerformed(evt);
            }
        });

        lblOrStatus.setText("Status:");

        javax.swing.GroupLayout jPanel36Layout = new javax.swing.GroupLayout(jPanel36);
        jPanel36.setLayout(jPanel36Layout);
        jPanel36Layout.setHorizontalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtOrFind, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel36Layout.createSequentialGroup()
                        .addComponent(btnOrSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblOrStatus)))
                .addContainerGap())
        );
        jPanel36Layout.setVerticalGroup(
            jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel36Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtOrFind, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel36Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnOrSearch)
                    .addComponent(lblOrStatus))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel39.setBorder(javax.swing.BorderFactory.createTitledBorder(""));
        jPanel39.setPreferredSize(new java.awt.Dimension(641, 58));
        jPanel39.setRequestFocusEnabled(false);

        btnOrDelete.setText("Delete");
        btnOrDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOrDeleteActionPerformed(evt);
            }
        });

        btnOrCreate.setText("Create");
        btnOrCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOrCreateActionPerformed(evt);
            }
        });

        btnOrUpdate.setText("Update");
        btnOrUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOrUpdateActionPerformed(evt);
            }
        });

        btnOrPrint.setText("Print");

        javax.swing.GroupLayout jPanel39Layout = new javax.swing.GroupLayout(jPanel39);
        jPanel39.setLayout(jPanel39Layout);
        jPanel39Layout.setHorizontalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel39Layout.createSequentialGroup()
                .addContainerGap(337, Short.MAX_VALUE)
                .addComponent(btnOrPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnOrUpdate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnOrCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnOrDelete)
                .addContainerGap())
        );
        jPanel39Layout.setVerticalGroup(
            jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel39Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel39Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnOrDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnOrCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnOrUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .addComponent(btnOrPrint))
                .addContainerGap())
        );

        jPanel40.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Item", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel36.setText("ID");

        jLabel37.setText("Quantity");

        btnOrAdd.setText("Add");
        btnOrAdd.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnOrAddActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel40Layout = new javax.swing.GroupLayout(jPanel40);
        jPanel40.setLayout(jPanel40Layout);
        jPanel40Layout.setHorizontalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel40Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel36)
                    .addComponent(jLabel37))
                .addGap(14, 14, 14)
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtOrItemId, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)
                    .addComponent(txtOrQuantity, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnOrAdd)
                .addGap(12, 12, 12))
        );
        jPanel40Layout.setVerticalGroup(
            jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel40Layout.createSequentialGroup()
                .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel40Layout.createSequentialGroup()
                        .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel36)
                            .addComponent(txtOrItemId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel40Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel37)
                            .addComponent(txtOrQuantity, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel40Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(btnOrAdd)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel41.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Employee ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtOrEmpId.setText("Your ID");

        javax.swing.GroupLayout jPanel41Layout = new javax.swing.GroupLayout(jPanel41);
        jPanel41.setLayout(jPanel41Layout);
        jPanel41Layout.setHorizontalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel41Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtOrEmpId, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel41Layout.setVerticalGroup(
            jPanel41Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel41Layout.createSequentialGroup()
                .addComponent(txtOrEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        jPanel42.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Terminal", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        javax.swing.GroupLayout jPanel42Layout = new javax.swing.GroupLayout(jPanel42);
        jPanel42.setLayout(jPanel42Layout);
        jPanel42Layout.setHorizontalGroup(
            jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel42Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(list2, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel42Layout.setVerticalGroup(
            jPanel42Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel42Layout.createSequentialGroup()
                .addComponent(list2, javax.swing.GroupLayout.DEFAULT_SIZE, 318, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel43.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Customer ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        javax.swing.GroupLayout jPanel43Layout = new javax.swing.GroupLayout(jPanel43);
        jPanel43.setLayout(jPanel43Layout);
        jPanel43Layout.setHorizontalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel43Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtOrCusId, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel43Layout.setVerticalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel43Layout.createSequentialGroup()
                .addComponent(txtOrCusId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel44.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Delivery", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel38.setText("Address");

        jLabel39.setText("Date");

        javax.swing.GroupLayout jPanel44Layout = new javax.swing.GroupLayout(jPanel44);
        jPanel44.setLayout(jPanel44Layout);
        jPanel44Layout.setHorizontalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel44Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel38)
                    .addComponent(jLabel39))
                .addGap(18, 18, 18)
                .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(txtOrDate, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE)
                    .addComponent(txtOrAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 215, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel44Layout.setVerticalGroup(
            jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel44Layout.createSequentialGroup()
                .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtOrAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel38))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel44Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtOrDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel39))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel30.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Order ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        javax.swing.GroupLayout jPanel30Layout = new javax.swing.GroupLayout(jPanel30);
        jPanel30.setLayout(jPanel30Layout);
        jPanel30Layout.setHorizontalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtOrID, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel30Layout.setVerticalGroup(
            jPanel30Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel30Layout.createSequentialGroup()
                .addComponent(txtOrID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel35Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel41, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel40, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel44, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel42, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(jPanel39, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel35Layout.createSequentialGroup()
                .addComponent(jPanel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel30, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel35Layout.createSequentialGroup()
                        .addComponent(jPanel41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel44, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(44, 44, 44)
                .addComponent(jPanel39, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel28Layout = new javax.swing.GroupLayout(jPanel28);
        jPanel28.setLayout(jPanel28Layout);
        jPanel28Layout.setHorizontalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 661, Short.MAX_VALUE)
            .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jPanel35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel28Layout.setVerticalGroup(
            jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 653, Short.MAX_VALUE)
            .addGroup(jPanel28Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel28Layout.createSequentialGroup()
                    .addContainerGap()
                    .addComponent(jPanel35, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab("  Order  ", jPanel28);

        jPanel45.setPreferredSize(new java.awt.Dimension(661, 653));

        jPanel46.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtRentSearch.setText("Find order");
        txtRentSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtRentSearchActionPerformed(evt);
            }
        });

        btnRentSearch.setText("Search");
        btnRentSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRentSearchActionPerformed(evt);
            }
        });

        lblRentStatus.setText("Status:");

        javax.swing.GroupLayout jPanel46Layout = new javax.swing.GroupLayout(jPanel46);
        jPanel46.setLayout(jPanel46Layout);
        jPanel46Layout.setHorizontalGroup(
            jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel46Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRentSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel46Layout.createSequentialGroup()
                        .addComponent(btnRentSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblRentStatus)))
                .addContainerGap())
        );
        jPanel46Layout.setVerticalGroup(
            jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel46Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtRentSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel46Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnRentSearch)
                    .addComponent(lblRentStatus))
                .addContainerGap())
        );

        jPanel47.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        btnRentDelete.setText("Delete");
        btnRentDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRentDeleteActionPerformed(evt);
            }
        });

        btnRentCreate.setText("Create");
        btnRentCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRentCreateActionPerformed(evt);
            }
        });

        btnRentUpdate.setText("Update");
        btnRentUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRentUpdateActionPerformed(evt);
            }
        });

        btnRentPrint.setText("Print");

        javax.swing.GroupLayout jPanel47Layout = new javax.swing.GroupLayout(jPanel47);
        jPanel47.setLayout(jPanel47Layout);
        jPanel47Layout.setHorizontalGroup(
            jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel47Layout.createSequentialGroup()
                .addContainerGap(337, Short.MAX_VALUE)
                .addComponent(btnRentPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 69, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRentUpdate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRentCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRentDelete)
                .addContainerGap())
        );
        jPanel47Layout.setVerticalGroup(
            jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel47Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel47Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnRentDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnRentCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnRentUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .addComponent(btnRentPrint))
                .addContainerGap())
        );

        jPanel48.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Item", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel48.setPreferredSize(new java.awt.Dimension(304, 153));

        jLabel40.setText("ID");

        jLabel41.setText("Rental price");

        btnItemAdd.setText("Add");

        javax.swing.GroupLayout jPanel48Layout = new javax.swing.GroupLayout(jPanel48);
        jPanel48.setLayout(jPanel48Layout);
        jPanel48Layout.setHorizontalGroup(
            jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel48Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel40)
                    .addComponent(jLabel41))
                .addGap(24, 24, 24)
                .addGroup(jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtRentRentalPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE)
                    .addComponent(txtItemId, javax.swing.GroupLayout.DEFAULT_SIZE, 134, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnItemAdd)
                .addContainerGap())
        );
        jPanel48Layout.setVerticalGroup(
            jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel48Layout.createSequentialGroup()
                .addGroup(jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel48Layout.createSequentialGroup()
                        .addGroup(jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtItemId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel40))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel48Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(txtRentRentalPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel41)))
                    .addGroup(jPanel48Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(btnItemAdd)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel49.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Employee ID", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel49.setPreferredSize(new java.awt.Dimension(304, 64));

        txtRentEmpId.setText("Your ID");

        javax.swing.GroupLayout jPanel49Layout = new javax.swing.GroupLayout(jPanel49);
        jPanel49.setLayout(jPanel49Layout);
        jPanel49Layout.setHorizontalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel49Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtRentEmpId, javax.swing.GroupLayout.DEFAULT_SIZE, 272, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel49Layout.setVerticalGroup(
            jPanel49Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel49Layout.createSequentialGroup()
                .addComponent(txtRentEmpId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel50.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Terminal", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        bliverændret.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                bliverændretActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel50Layout = new javax.swing.GroupLayout(jPanel50);
        jPanel50.setLayout(jPanel50Layout);
        jPanel50Layout.setHorizontalGroup(
            jPanel50Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel50Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(bliverændret, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel50Layout.setVerticalGroup(
            jPanel50Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel50Layout.createSequentialGroup()
                .addComponent(bliverændret, javax.swing.GroupLayout.DEFAULT_SIZE, 317, Short.MAX_VALUE)
                .addContainerGap())
        );

        jPanel51.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Customer", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel51.setPreferredSize(new java.awt.Dimension(331, 64));

        txtRentCusId.setText("Customer ID");

        javax.swing.GroupLayout jPanel51Layout = new javax.swing.GroupLayout(jPanel51);
        jPanel51.setLayout(jPanel51Layout);
        jPanel51Layout.setHorizontalGroup(
            jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel51Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtRentCusId, javax.swing.GroupLayout.DEFAULT_SIZE, 299, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel51Layout.setVerticalGroup(
            jPanel51Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel51Layout.createSequentialGroup()
                .addComponent(txtRentCusId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel52.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Rentalperiod", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel42.setText("From date");

        jLabel43.setText("To date");

        javax.swing.GroupLayout jPanel52Layout = new javax.swing.GroupLayout(jPanel52);
        jPanel52.setLayout(jPanel52Layout);
        jPanel52Layout.setHorizontalGroup(
            jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel52Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel42)
                    .addComponent(jLabel43))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 36, Short.MAX_VALUE)
                .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(txtRentFromDate)
                    .addComponent(txtRentToDate, javax.swing.GroupLayout.DEFAULT_SIZE, 187, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel52Layout.setVerticalGroup(
            jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel52Layout.createSequentialGroup()
                .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtRentFromDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel42))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel52Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtRentToDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel43))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel53.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Delivery", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        jLabel44.setText("Address");

        jLabel45.setText("Date");

        javax.swing.GroupLayout jPanel53Layout = new javax.swing.GroupLayout(jPanel53);
        jPanel53.setLayout(jPanel53Layout);
        jPanel53Layout.setHorizontalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel53Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel44)
                    .addComponent(jLabel45))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 48, Short.MAX_VALUE)
                .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addComponent(txtRentAddress)
                    .addComponent(txtRentDate, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel53Layout.setVerticalGroup(
            jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel53Layout.createSequentialGroup()
                .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtRentAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel44))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel53Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtRentDate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel45))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout jPanel45Layout = new javax.swing.GroupLayout(jPanel45);
        jPanel45.setLayout(jPanel45Layout);
        jPanel45Layout.setHorizontalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel45Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel46, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel45Layout.createSequentialGroup()
                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel49, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel48, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel52, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel53, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel50, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel51, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(jPanel47, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel45Layout.setVerticalGroup(
            jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel45Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel46, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel49, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel51, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel45Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel45Layout.createSequentialGroup()
                        .addComponent(jPanel48, javax.swing.GroupLayout.PREFERRED_SIZE, 84, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel52, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel53, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel50, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(44, 44, 44)
                .addComponent(jPanel47, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel29Layout = new javax.swing.GroupLayout(jPanel29);
        jPanel29.setLayout(jPanel29Layout);
        jPanel29Layout.setHorizontalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel45, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel29Layout.setVerticalGroup(
            jPanel29Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel29Layout.createSequentialGroup()
                .addComponent(jPanel45, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("  Rent  ", jPanel29);

        jPanel2.setPreferredSize(new java.awt.Dimension(661, 653));

        jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtProSearch.setText("Find Product");
        txtProSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtProSearchActionPerformed(evt);
            }
        });

        btnProSearch.setText("Search");
        btnProSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProSearchActionPerformed(evt);
            }
        });

        lblProStatus.setText("Status:");

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtProSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel6Layout.createSequentialGroup()
                        .addComponent(btnProSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblProStatus)))
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtProSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnProSearch)
                    .addComponent(lblProStatus))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel7.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        btnProDelete.setText("Delete");
        btnProDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProDeleteActionPerformed(evt);
            }
        });

        btnProCreate.setText("Create");
        btnProCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProCreateActionPerformed(evt);
            }
        });

        btnProUpdate.setText("Update");
        btnProUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProUpdateActionPerformed(evt);
            }
        });

        btnProMove.setText("Move goods");
        btnProMove.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnProMoveActionPerformed(evt);
            }
        });

        jButton1.setText("Add goods");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(218, Short.MAX_VALUE)
                .addComponent(jButton1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnProMove)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnProUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 67, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnProCreate, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnProDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jPanel7Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnProMove, jButton1});

        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnProDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnProCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnProUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .addComponent(btnProMove)
                    .addComponent(jButton1))
                .addContainerGap())
        );

        jPanel7Layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnProCreate, btnProDelete, btnProMove, btnProUpdate});

        jPanel9.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "General", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel9.setPreferredSize(new java.awt.Dimension(304, 159));

        jLabel8.setText("ID");

        jLabel9.setText("Sales price");

        jLabel10.setText("Regular price");

        jLabel11.setText("Discount");

        lblProSalesPrice.setText("Not on sale");

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel8)
                    .addComponent(jLabel9)
                    .addComponent(jLabel10)
                    .addComponent(jLabel11))
                .addGap(12, 12, 12)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtProID, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                    .addComponent(txtProDiscount, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                    .addComponent(txtProRegPrice, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                    .addComponent(lblProSalesPrice))
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel9)
                    .addComponent(lblProSalesPrice))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProRegPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProDiscount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11))
                .addGap(241, 241, 241))
        );

        jPanel10.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Name", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel10.setPreferredSize(new java.awt.Dimension(641, 64));

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtProName, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addComponent(txtProName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jPanel11.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Rental", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel11.setPreferredSize(new java.awt.Dimension(304, 158));

        jLabel13.setText("Serial number");

        jLabel15.setText("Price");

        jLabel14.setText("Status");

        javax.swing.GroupLayout jPanel11Layout = new javax.swing.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jLabel13)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtProRentPrice, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                    .addComponent(txtProStatus, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE)
                    .addComponent(txtProSerial, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 203, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel11Layout.createSequentialGroup()
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProSerial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProRentPrice, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel15))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel11Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProStatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel14))
                .addContainerGap(59, Short.MAX_VALUE))
        );

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Stock", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel12.setPreferredSize(new java.awt.Dimension(304, 213));

        jLabel18.setText("Byggemarked");

        jLabel17.setText("Tømmerhandel");

        jLabel19.setText("Leverandør");

        jLabel20.setText("Total");

        jLabel21.setText("Minimum stock");

        txtProMinStock.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtProMinStockActionPerformed(evt);
            }
        });

        lblProByggemarked.setText("Empty");

        lblProTommerhandel.setText("Empty");

        lblProLeverandor.setText("Empty");

        lblProTotal.setText("Empty");

        javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel18)
                    .addComponent(jLabel17)
                    .addComponent(jLabel19)
                    .addComponent(jLabel21)
                    .addComponent(jLabel20))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(lblProStockstatus)
                    .addComponent(txtProMinStock, javax.swing.GroupLayout.DEFAULT_SIZE, 197, Short.MAX_VALUE)
                    .addGroup(jPanel12Layout.createSequentialGroup()
                        .addGap(4, 4, 4)
                        .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(lblProTommerhandel)
                            .addComponent(lblProByggemarked)
                            .addComponent(lblProLeverandor, javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(lblProTotal, javax.swing.GroupLayout.Alignment.LEADING))))
                .addContainerGap())
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel12Layout.createSequentialGroup()
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel18)
                    .addComponent(lblProByggemarked))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel17)
                    .addComponent(lblProTommerhandel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel19)
                    .addComponent(lblProLeverandor))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel20)
                    .addComponent(lblProTotal))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtProMinStock, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel21))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(lblProStockstatus)
                .addContainerGap(80, Short.MAX_VALUE))
        );

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Description", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtProDesc.setColumns(20);
        txtProDesc.setFont(new java.awt.Font("Tahoma", 0, 11));
        txtProDesc.setRows(5);
        jScrollPane2.setViewportView(txtProDesc);

        javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
        jPanel13.setLayout(jPanel13Layout);
        jPanel13Layout.setHorizontalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel13Layout.setVerticalGroup(
            jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 175, Short.MAX_VALUE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel10, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, 305, Short.MAX_VALUE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addComponent(jPanel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(9, 9, 9)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, 159, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(1, 1, 1)
                        .addComponent(jPanel11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jPanel13, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel12, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("  Products  ", jPanel2);

        jPanel3.setBackground(new java.awt.Color(255, 255, 255));

        jPanel8.setPreferredSize(new java.awt.Dimension(661, 653));

        jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtCusSearch.setText("Find Customer");
        txtCusSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtCusSearchActionPerformed(evt);
            }
        });

        btnCusSearch.setText("Search");
        btnCusSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCusSearchActionPerformed(evt);
            }
        });

        lblCusStatus.setText("Status:");

        javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
        jPanel14.setLayout(jPanel14Layout);
        jPanel14Layout.setHorizontalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtCusSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel14Layout.createSequentialGroup()
                        .addComponent(btnCusSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblCusStatus)))
                .addContainerGap())
        );
        jPanel14Layout.setVerticalGroup(
            jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtCusSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnCusSearch)
                    .addComponent(lblCusStatus))
                .addContainerGap())
        );

        jPanel15.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        jButton8.setText("Delete");
        jButton8.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton8ActionPerformed(evt);
            }
        });

        jButton9.setText("Create");
        jButton9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton9ActionPerformed(evt);
            }
        });

        jButton10.setText("Update");
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel15Layout = new javax.swing.GroupLayout(jPanel15);
        jPanel15.setLayout(jPanel15Layout);
        jPanel15Layout.setHorizontalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()
                .addContainerGap(412, Short.MAX_VALUE)
                .addComponent(jButton10)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton9)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton8)
                .addContainerGap())
        );
        jPanel15Layout.setVerticalGroup(
            jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jButton8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jButton10, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
                .addContainerGap())
        );

        jPanel16.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "General", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel16.setPreferredSize(new java.awt.Dimension(304, 366));

        jLabel12.setText("ID");

        jLabel16.setText("Name");

        jLabel22.setText("Address");

        jLabel23.setText("Company");

        jLabel24.setText("Max discount");

        jLabel25.setText("Credit");

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel12)
                    .addComponent(jLabel16)
                    .addComponent(jLabel22)
                    .addComponent(jLabel23)
                    .addComponent(jLabel25)
                    .addComponent(jLabel24))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtCusDiscount, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtCusCredit, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtCusCompany, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtCusAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtCusName, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtCusId, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCusId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel12))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCusName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel16))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCusAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel22))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCusCompany, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel23))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCusCredit, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel25))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtCusDiscount, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel24))
                .addGap(189, 189, 189))
        );

        jPanel17.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        btnCusDelete.setText("Delete");
        btnCusDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCusDeleteActionPerformed(evt);
            }
        });

        btnCusCreate.setText("Create");
        btnCusCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCusCreateActionPerformed(evt);
            }
        });

        btnCusUpdate.setText("Update");
        btnCusUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCusUpdateActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel17Layout = new javax.swing.GroupLayout(jPanel17);
        jPanel17.setLayout(jPanel17Layout);
        jPanel17Layout.setHorizontalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                .addContainerGap(412, Short.MAX_VALUE)
                .addComponent(btnCusUpdate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCusCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnCusDelete)
                .addContainerGap())
        );
        jPanel17Layout.setVerticalGroup(
            jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel17Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnCusDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCusCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnCusUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel14, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel15, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel17, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel16, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(271, 271, 271)
                .addComponent(jPanel17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(148, 148, 148)
                .addComponent(jPanel15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(59, 59, 59))
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel8, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, 653, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(" Customers ", jPanel3);

        jPanel4.setBackground(new java.awt.Color(255, 255, 255));

        jLabel4.setFont(new java.awt.Font("Tahoma", 1, 24));
        jLabel4.setForeground(new java.awt.Color(204, 204, 204));
        jLabel4.setText("SUPPLIERS");

        jPanel18.setPreferredSize(new java.awt.Dimension(661, 653));

        jPanel19.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtSupSearch.setText("Find Suppliers");
        txtSupSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSupSearchActionPerformed(evt);
            }
        });

        btnSupSearch.setText("Search");
        btnSupSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSupSearchActionPerformed(evt);
            }
        });

        lblSupStatus.setText("Status:");

        javax.swing.GroupLayout jPanel19Layout = new javax.swing.GroupLayout(jPanel19);
        jPanel19.setLayout(jPanel19Layout);
        jPanel19Layout.setHorizontalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtSupSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel19Layout.createSequentialGroup()
                        .addComponent(btnSupSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblSupStatus)))
                .addContainerGap())
        );
        jPanel19Layout.setVerticalGroup(
            jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel19Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtSupSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel19Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnSupSearch)
                    .addComponent(lblSupStatus))
                .addContainerGap())
        );

        jPanel21.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "General", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel21.setPreferredSize(new java.awt.Dimension(304, 147));

        jLabel26.setText("ID");

        jLabel27.setText("Name");

        jLabel28.setText("Address");

        jLabel29.setText("Company");

        txtSupId.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtSupIdActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel21Layout = new javax.swing.GroupLayout(jPanel21);
        jPanel21.setLayout(jPanel21Layout);
        jPanel21Layout.setHorizontalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel26)
                    .addComponent(jLabel27)
                    .addComponent(jLabel28)
                    .addComponent(jLabel29))
                .addGap(22, 22, 22)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtSupCompany, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtSupAddress, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtSupName, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtSupId, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel21Layout.setVerticalGroup(
            jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel21Layout.createSequentialGroup()
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSupId, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel26))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSupName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel27))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSupAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel28))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel21Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtSupCompany, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel29))
                .addGap(229, 229, 229))
        );

        jPanel22.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        btnSupDelete.setText("Delete");
        btnSupDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSupDeleteActionPerformed(evt);
            }
        });

        btnSupCreate.setText("Create");
        btnSupCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSupCreateActionPerformed(evt);
            }
        });

        btnSupUpdate.setText("Update");
        btnSupUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSupUpdateActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel22Layout = new javax.swing.GroupLayout(jPanel22);
        jPanel22.setLayout(jPanel22Layout);
        jPanel22Layout.setHorizontalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel22Layout.createSequentialGroup()
                .addContainerGap(412, Short.MAX_VALUE)
                .addComponent(btnSupUpdate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSupCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnSupDelete)
                .addContainerGap())
        );
        jPanel22Layout.setVerticalGroup(
            jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel22Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel22Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnSupDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnSupCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnSupUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel19, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel22, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel21, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(323, 323, 323)
                .addComponent(jPanel22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(678, 678, 678))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap(513, Short.MAX_VALUE)
                .addComponent(jLabel4)
                .addContainerGap())
            .addComponent(jPanel18, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, 653, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(240, 240, 240)
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("  Suppliers  ", jPanel4);

        jPanel5.setBackground(new java.awt.Color(255, 255, 255));
        jPanel5.setVerifyInputWhenFocusTarget(false);

        jLabel5.setFont(new java.awt.Font("Tahoma", 1, 24));
        jLabel5.setForeground(new java.awt.Color(204, 204, 204));
        jLabel5.setText("EMPLOYEES");

        jPanel24.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Search", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N

        txtEmpSearch.setText("Find Employees");
        txtEmpSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                txtEmpSearchActionPerformed(evt);
            }
        });

        btnEmpSearch.setText("Search");
        btnEmpSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpSearchActionPerformed(evt);
            }
        });

        lblEmpStatus.setText("Status:");

        javax.swing.GroupLayout jPanel24Layout = new javax.swing.GroupLayout(jPanel24);
        jPanel24.setLayout(jPanel24Layout);
        jPanel24Layout.setHorizontalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtEmpSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 609, Short.MAX_VALUE)
                    .addGroup(jPanel24Layout.createSequentialGroup()
                        .addComponent(btnEmpSearch)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(lblEmpStatus)))
                .addContainerGap())
        );
        jPanel24Layout.setVerticalGroup(
            jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel24Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtEmpSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel24Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(btnEmpSearch)
                    .addComponent(lblEmpStatus))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel26.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "General", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Tahoma", 1, 11))); // NOI18N
        jPanel26.setPreferredSize(new java.awt.Dimension(304, 147));

        jLabel30.setText("ID");

        jLabel31.setText("Name");

        jLabel32.setText("Address");

        jLabel33.setText("Department");

        javax.swing.GroupLayout jPanel26Layout = new javax.swing.GroupLayout(jPanel26);
        jPanel26.setLayout(jPanel26Layout);
        jPanel26Layout.setHorizontalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel30)
                    .addComponent(jLabel31)
                    .addComponent(jLabel32)
                    .addComponent(jLabel33))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(txtEmpDepart, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtEmpAddress, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtEmpName, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE)
                    .addComponent(txtEmpID, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 205, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel26Layout.setVerticalGroup(
            jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel26Layout.createSequentialGroup()
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtEmpID, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel30))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtEmpName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel31))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtEmpAddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel32))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel26Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(txtEmpDepart, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel33))
                .addGap(229, 229, 229))
        );

        jPanel27.setBorder(javax.swing.BorderFactory.createTitledBorder(""));

        btnEmpDelete.setText("Delete");
        btnEmpDelete.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpDeleteActionPerformed(evt);
            }
        });

        btnEmpCreate.setText("Create");
        btnEmpCreate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpCreateActionPerformed(evt);
            }
        });

        btnEmpUpdate.setText("Update");
        btnEmpUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnEmpUpdateActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel27Layout = new javax.swing.GroupLayout(jPanel27);
        jPanel27.setLayout(jPanel27Layout);
        jPanel27Layout.setHorizontalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel27Layout.createSequentialGroup()
                .addContainerGap(412, Short.MAX_VALUE)
                .addComponent(btnEmpUpdate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEmpCreate)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnEmpDelete)
                .addContainerGap())
        );
        jPanel27Layout.setVerticalGroup(
            jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel27Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel27Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnEmpDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnEmpCreate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(btnEmpUpdate, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel23Layout = new javax.swing.GroupLayout(jPanel23);
        jPanel23.setLayout(jPanel23Layout);
        jPanel23Layout.setHorizontalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jPanel24, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel27, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        jPanel23Layout.setVerticalGroup(
            jPanel23Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel23Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel26, javax.swing.GroupLayout.PREFERRED_SIZE, 147, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 322, Short.MAX_VALUE)
                .addComponent(jPanel27, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(506, Short.MAX_VALUE)
                .addComponent(jLabel5)
                .addContainerGap())
            .addComponent(jPanel23, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addComponent(jPanel23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 0, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("  Employees  ", jPanel5);

        menuBar.setText("File");
        menuBar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuBarActionPerformed(evt);
            }
        });

        menuHelp.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F1, 0));
        menuHelp.setText("Help");
        menuBar.add(menuHelp);

        menuAbout.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F2, 0));
        menuAbout.setText("About");
        menuAbout.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuAboutActionPerformed(evt);
            }
        });
        menuBar.add(menuAbout);

        menuExit.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_F4, java.awt.event.InputEvent.ALT_MASK));
        menuExit.setText("Exit");
        menuExit.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                menuExitActionPerformed(evt);
            }
        });
        menuBar.add(menuExit);

        jMenuBar1.add(menuBar);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 666, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 680, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnEmpUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnEmpUpdateActionPerformed
    {//GEN-HEADEREND:event_btnEmpUpdateActionPerformed
        Employee emp = assCtl.findEmployeeID(txtEmpID.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to update", "", JOptionPane.YES_NO_OPTION);
        if (emp != null && pane == 0)
        {
            emp.setAddress(txtEmpAddress.getText());
            emp.setCompany(txtEmpDepart.getText());
            emp.setName(txtEmpName.getText());
            lblEmpStatus.setText("Status: Employee was updated");
        }
        else
        {
            lblEmpStatus.setText("Status: update was canceled");
        }
}//GEN-LAST:event_btnEmpUpdateActionPerformed

    private void btnEmpCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnEmpCreateActionPerformed
    {//GEN-HEADEREND:event_btnEmpCreateActionPerformed
        boolean added = assCtl.addEmployee(txtEmpID.getText(), txtEmpName.getText(), txtEmpAddress.getText(), txtEmpDepart.getText());
        if (added)
        {
            txtEmpClear();
            JOptionPane.showMessageDialog(null, "Employee added!");
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Something went wrong.. Try again", "Error", JOptionPane.ERROR_MESSAGE);
        }
}//GEN-LAST:event_btnEmpCreateActionPerformed

    private void btnEmpDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnEmpDeleteActionPerformed
    {//GEN-HEADEREND:event_btnEmpDeleteActionPerformed

        Employee emp = assCtl.findEmployeeID(txtEmpID.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to delete", "", JOptionPane.YES_NO_OPTION);
        if (emp != null && pane == 0)
        {
            assCtl.deleteAssociateID(txtEmpID.getText());
            lblEmpStatus.setText("Status: Employee was deleted");
            txtEmpClear();
        }
        else
        {
            lblEmpStatus.setText("Status: delete was canceled");
        }
}//GEN-LAST:event_btnEmpDeleteActionPerformed

    private void txtEmpSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtEmpSearchActionPerformed
    {//GEN-HEADEREND:event_txtEmpSearchActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtEmpSearchActionPerformed

    private void btnSupUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSupUpdateActionPerformed
    {//GEN-HEADEREND:event_btnSupUpdateActionPerformed
        Supplier sup = assCtl.findSupplierID(txtSupId.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to update", "", JOptionPane.YES_NO_OPTION);
        if (sup != null && pane == 0)
        {
            sup.setAddress(txtSupAddress.getText());
            sup.setCompany(txtSupCompany.getText());
            sup.setName(txtSupName.getText());
            lblSupStatus.setText("Status: supplier was updated");
        }
        else
        {
            lblSupStatus.setText("Status: update was canceled");
        }
}//GEN-LAST:event_btnSupUpdateActionPerformed

    private void btnSupCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSupCreateActionPerformed
    {//GEN-HEADEREND:event_btnSupCreateActionPerformed
        boolean added = assCtl.addSupplier(txtSupId.getText(), txtSupName.getText(), txtSupAddress.getText(), txtSupCompany.getText());
        if (added)
        {
            txtSupClear();
            JOptionPane.showMessageDialog(null, "Supplier added!");
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Something went wrong.. Try again", "Error", JOptionPane.ERROR_MESSAGE);
        }
}//GEN-LAST:event_btnSupCreateActionPerformed

    private void btnSupDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSupDeleteActionPerformed
    {//GEN-HEADEREND:event_btnSupDeleteActionPerformed
        Supplier sup = assCtl.findSupplierID(txtSupId.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to delete", "", JOptionPane.YES_NO_OPTION);
        if (sup != null && pane == 0)
        {
            assCtl.deleteAssociateID(txtSupId.getText());
            lblSupStatus.setText("Status: Supplier was deleted");
            txtSupClear();
        }
        else
        {
            lblSupStatus.setText("Status: delete was canceled");
        }
}//GEN-LAST:event_btnSupDeleteActionPerformed

    private void txtSupSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtSupSearchActionPerformed
    {//GEN-HEADEREND:event_txtSupSearchActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtSupSearchActionPerformed

    private void btnCusUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCusUpdateActionPerformed
    {//GEN-HEADEREND:event_btnCusUpdateActionPerformed
        Customer cus = assCtl.findCustomerID(txtCusId.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to update", "", JOptionPane.YES_NO_OPTION);
        if (cus != null && pane == 0)
        {
            cus.setAddress(txtCusAddress.getText());
            cus.setCompany(txtCusCompany.getText());
            cus.setName(txtCusName.getText());
            cus.setCredit(Double.parseDouble(txtCusCredit.getText()));
            cus.setDiscount(Double.parseDouble(txtCusDiscount.getText()));
            lblCusStatus.setText("Status: customer was updated");
        }
        else
        {
            lblCusStatus.setText("Status: update was canceled");
        }
}//GEN-LAST:event_btnCusUpdateActionPerformed

    private void btnCusCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCusCreateActionPerformed
    {//GEN-HEADEREND:event_btnCusCreateActionPerformed
        //String id, String name, String address, String company, double credit, double discount
        int added = assCtl.addCustomer(txtCusId.getText(), txtCusName.getText(), txtCusAddress.getText(), txtCusCompany.getText(), Double.parseDouble(txtCusCredit.getText()), Double.parseDouble(txtCusDiscount.getText()));
        if (added == 2)
        {
            txtCusClear();
            JOptionPane.showMessageDialog(null, "Customer added!");
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Something went wrong.. Try again", "Error", JOptionPane.ERROR_MESSAGE);
        }
}//GEN-LAST:event_btnCusCreateActionPerformed

    private void btnCusDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCusDeleteActionPerformed
    {//GEN-HEADEREND:event_btnCusDeleteActionPerformed
        Customer cus = assCtl.findCustomerID(txtCusId.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to delete", "", JOptionPane.YES_NO_OPTION);
        if (cus != null && pane == 0)
        {
            assCtl.deleteAssociateID(txtCusId.getText());
            lblCusStatus.setText("Status: customer was deleted");
            txtCusClear();
        }
        else
        {
            lblCusStatus.setText("Status: delete was canceled");
        }
}//GEN-LAST:event_btnCusDeleteActionPerformed

    private void jButton10ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton10ActionPerformed
    {//GEN-HEADEREND:event_jButton10ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jButton10ActionPerformed

    private void jButton9ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton9ActionPerformed
    {//GEN-HEADEREND:event_jButton9ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jButton9ActionPerformed

    private void jButton8ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton8ActionPerformed
    {//GEN-HEADEREND:event_jButton8ActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_jButton8ActionPerformed

    private void txtCusSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtCusSearchActionPerformed
    {//GEN-HEADEREND:event_txtCusSearchActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtCusSearchActionPerformed

    private void txtProMinStockActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtProMinStockActionPerformed
    {//GEN-HEADEREND:event_txtProMinStockActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtProMinStockActionPerformed

    private void btnProUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProUpdateActionPerformed
    {//GEN-HEADEREND:event_btnProUpdateActionPerformed
        Product pro = proCtl.findProduct(txtProID.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to update", "", JOptionPane.YES_NO_OPTION);
        if (pro != null && pane == 0)
        {
            //Name
            pro.setName(txtProName.getText());
            //General
            lblProSalesPrice.setText("" + pro.Price());
            pro.setPrice(Double.parseDouble(txtProRegPrice.getText()));
            pro.setSale(Double.parseDouble(txtProDiscount.getText()));
            //Stock
            lblProByggemarked.setText("" + pro.locationQuantity(1));
            lblProTommerhandel.setText("" + pro.locationQuantity(2));
            lblProLeverandor.setText("" + pro.locationQuantity(3));
            lblProTotal.setText("" + pro.copies());
            pro.setMinStockLimit(Integer.parseInt(txtProMinStock.getText()));
            if (pro.stockStatus() == false)
            {
                lblProStockstatus.setText("Stock is running low!");
            }
            else
            {
                lblProStockstatus.setText("");
            }
            //Rental
            pro.setRentalPriceLimit(Double.parseDouble(txtProRentPrice.getText()));
            //Description
            pro.setDescription(txtProDesc.getText());
            lblProStatus.setText("Status: product was updated");
        }
        else
        {
            lblProStatus.setText("Status: update was canceled");
        }
}//GEN-LAST:event_btnProUpdateActionPerformed

    private void btnProCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProCreateActionPerformed
    {//GEN-HEADEREND:event_btnProCreateActionPerformed
        if (!txtProID.getText().isEmpty() && !txtProName.getText().isEmpty() && !txtProDesc.getText().isEmpty() && !txtProRegPrice.getText().isEmpty() && !txtProRentPrice.getText().isEmpty() && !txtProDiscount.getText().isEmpty() && !txtProMinStock.getText().isEmpty())
        {
            //String id, String name, String description, double price, double rentalPrice, double sale, int minStock
            boolean added = proCtl.addProduct(txtProID.getText(), txtProName.getText(), txtProDesc.getText(), Double.parseDouble(txtProRegPrice.getText()), Double.parseDouble(txtProRentPrice.getText()), Double.parseDouble(txtProDiscount.getText()), Integer.parseInt(txtProMinStock.getText()));
            if (added)
            {
                txtSupClear();
                JOptionPane.showMessageDialog(null, "Product is added!");
            }
            else
            {
                JOptionPane.showMessageDialog(null, "Something went wrong.. Try again", "Error", JOptionPane.ERROR_MESSAGE);
            }
        }
}//GEN-LAST:event_btnProCreateActionPerformed

    private void btnProDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProDeleteActionPerformed
    {//GEN-HEADEREND:event_btnProDeleteActionPerformed
        Product pro = proCtl.findProduct(txtProID.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to delete", "", JOptionPane.YES_NO_OPTION);
        if (pro != null && pane == 0)
        {
            proCtl.deleteProduct(txtProID.getText());
            lblProStatus.setText("Status: Product was deleted");
            txtProClear();
        }
        else
        {
            lblProStatus.setText("Status: delete was canceled");
        }
}//GEN-LAST:event_btnProDeleteActionPerformed

    private void txtProSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtProSearchActionPerformed
    {//GEN-HEADEREND:event_txtProSearchActionPerformed
        // TODO add your handling code here:
}//GEN-LAST:event_txtProSearchActionPerformed

    private void txtOrFindActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtOrFindActionPerformed
    {//GEN-HEADEREND:event_txtOrFindActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtOrFindActionPerformed

    private void btnOrDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOrDeleteActionPerformed
    {//GEN-HEADEREND:event_btnOrDeleteActionPerformed
        int pane = JOptionPane.showConfirmDialog(null, "do you really want to delete", "", JOptionPane.YES_NO_OPTION);
        if (!txtOrID.getText().isEmpty() && pane == 0)
        {
            tradeCtl.deleteTrade(txtOrID.getText());
            lblOrStatus.setText("Status: order was deleted");
            txtOrdClear();
        }
        else
        {
            lblOrStatus.setText("Status: order was canceled");
        }
    }//GEN-LAST:event_btnOrDeleteActionPerformed

    private void btnOrCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOrCreateActionPerformed
    {//GEN-HEADEREND:event_btnOrCreateActionPerformed
        int added = 0;
        if (!txtOrID.getText().isEmpty() && !txtOrCusId.getText().isEmpty() && !txtOrEmpId.getText().isEmpty() && !txtOrDate.getText().isEmpty() && !txtOrAddress.getText().isEmpty())
        {
            added = tradeCtl.addOrder(txtOrID.getText(), txtOrDate.getText(), txtOrAddress.getText(), txtOrEmpId.getText(), txtOrCusId.getText());
        }
        if (added == 3)
        {
            JOptionPane.showMessageDialog(null, "Order done!");
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Something went wrong.. Try again", "Error", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_btnOrCreateActionPerformed

    private void btnOrUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOrUpdateActionPerformed
    {//GEN-HEADEREND:event_btnOrUpdateActionPerformed
        Order ord = tradeCtl.findOrder(txtOrFind.getText());

        int pane = JOptionPane.showConfirmDialog(null, "do you really want to update", "", JOptionPane.YES_NO_OPTION);
        if (ord != null && pane == 0)
        {
            ord.setId(txtOrID.getText());
            ord.setEmployeeID(txtOrEmpId.getText());
            ord.setCustomerID(txtOrCusId.getText());
            ord.setDeliveryAddress(txtOrAddress.getText());
            ord.setDeliveryDate(txtOrDate.getText());
            lblOrStatus.setText("Status: Order was updated");
        }
        else
        {
            lblOrStatus.setText("Status: update was canceled");
        }
    }//GEN-LAST:event_btnOrUpdateActionPerformed

    private void txtRentSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtRentSearchActionPerformed
    {//GEN-HEADEREND:event_txtRentSearchActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtRentSearchActionPerformed

    private void btnRentDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRentDeleteActionPerformed
    {//GEN-HEADEREND:event_btnRentDeleteActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRentDeleteActionPerformed

    private void btnRentCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRentCreateActionPerformed
    {//GEN-HEADEREND:event_btnRentCreateActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRentCreateActionPerformed

    private void btnRentUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRentUpdateActionPerformed
    {//GEN-HEADEREND:event_btnRentUpdateActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRentUpdateActionPerformed

    private void bliverændretActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_bliverændretActionPerformed
    {//GEN-HEADEREND:event_bliverændretActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_bliverændretActionPerformed

    private void menuExitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_menuExitActionPerformed
    {//GEN-HEADEREND:event_menuExitActionPerformed
        System.exit(0);
    }//GEN-LAST:event_menuExitActionPerformed

    private void menuBarActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_menuBarActionPerformed
    {//GEN-HEADEREND:event_menuBarActionPerformed
    }//GEN-LAST:event_menuBarActionPerformed

    private void menuAboutActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_menuAboutActionPerformed
    {//GEN-HEADEREND:event_menuAboutActionPerformed
        dialogAbout.setVisible(true);
    }//GEN-LAST:event_menuAboutActionPerformed

    private void btnEmpSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnEmpSearchActionPerformed
    {//GEN-HEADEREND:event_btnEmpSearchActionPerformed
        Employee emp = assCtl.findEmployeeID(txtEmpSearch.getText());
        if (emp != null)
        {
            lblEmpStatus.setText("Status: Employee was found");
            txtEmpID.setText(emp.getId());
            txtEmpName.setText(emp.getName());
            txtEmpDepart.setText(emp.getCompany());
            txtEmpAddress.setText(emp.getAddress());
        }
        else
        {
            lblEmpStatus.setText("Status: there is no employee with the ID ");
            txtEmpClear();
        }
}//GEN-LAST:event_btnEmpSearchActionPerformed

    private void btnOrSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOrSearchActionPerformed
    {//GEN-HEADEREND:event_btnOrSearchActionPerformed
        Order ord = tradeCtl.findOrder(txtOrFind.getText());
        if (ord != null)
        {
            lblOrStatus.setText("Status: Order was found");
            txtOrID.setText(ord.getId());
            txtOrCusId.setText(ord.getCustomerID());
            txtOrEmpId.setText(ord.getEmployeeID());
            txtOrAddress.setText(ord.getDeliveryAddress());
            txtOrDate.setText(ord.getDeliveryDate());
            list2.removeAll();
            for (SalesLineItem item : ord.getSaleLines())
            {
                list2.add(item.getProduct().getName() + " x" + item.getQuantity());
            }
        }
        else
        {
            lblEmpStatus.setText("Status: there is no order with the ID ");
            txtOrdClear();
        }

    }//GEN-LAST:event_btnOrSearchActionPerformed

    private void txtSaleFindActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtSaleFindActionPerformed
    {//GEN-HEADEREND:event_txtSaleFindActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtSaleFindActionPerformed

    private void btnSalesSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSalesSearchActionPerformed
    {//GEN-HEADEREND:event_btnSalesSearchActionPerformed
        Trade trade = tradeCtl.findTrade(txtSaleFind.getText());
        if (trade != null)
        {
            lblSalesStatus.setText("Status: Sale was found");
            txtSaleID.setText(trade.getId());
            txtSaleCusId.setText(trade.getCustomerID());
            txtSaleEmpId.setText(trade.getEmployeeID());
            list1.removeAll();
            for (SalesLineItem item : trade.getSaleLines())
            {
                list1.add(item.getProduct().getName() + " x" + item.getQuantity());
            }
        }
        else
        {
            lblSalesStatus.setText("Status: there is no sale with the ID ");
            txtSaleClear();
        }
    }//GEN-LAST:event_btnSalesSearchActionPerformed

    private void btnSalesDeleteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSalesDeleteActionPerformed
    {//GEN-HEADEREND:event_btnSalesDeleteActionPerformed
        int pane = JOptionPane.showConfirmDialog(null, "do you really want to delete", "", JOptionPane.YES_NO_OPTION);
        if (!txtSaleID.getText().isEmpty() && pane == 0)
        {
            tradeCtl.deleteTrade(txtSaleID.getText());
            lblSalesStatus.setText("Status: sale was deleted");
            txtSaleClear();
        }
        else
        {
            lblSalesStatus.setText("Status: sale was canceled");
        }
    }//GEN-LAST:event_btnSalesDeleteActionPerformed

    private void btnSalesCreateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSalesCreateActionPerformed
    {//GEN-HEADEREND:event_btnSalesCreateActionPerformed
        boolean added = false;
        if (!txtSaleID.getText().isEmpty() && !txtSaleEmpId.getText().isEmpty())
        {
            added = tradeCtl.addTrade(txtSaleID.getText(), txtSaleEmpId.getText());
        }
        if (!txtSaleCusId.getText().isEmpty())
        {
            tradeCtl.addCustomer(txtSaleCusId.getText(), txtSaleID.getText());
        }
        if (added)
        {
            JOptionPane.showMessageDialog(null, "Sale done!");
        }
        else
        {
            JOptionPane.showMessageDialog(null, "Something went wrong.. Try again", "Error", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_btnSalesCreateActionPerformed

    private void btnSalesUpdateActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSalesUpdateActionPerformed
    {//GEN-HEADEREND:event_btnSalesUpdateActionPerformed
        Trade trade = tradeCtl.findTrade(txtSaleFind.getText());
        int pane = JOptionPane.showConfirmDialog(null, "do you really want to update", "", JOptionPane.YES_NO_OPTION);
        if (trade != null && pane == 0)
        {
            trade.setId(txtSaleID.getText());
            trade.setCustomerID(txtSaleCusId.getText());
            trade.setEmployeeID(txtSaleEmpId.getText());
        }
        else
        {
            lblProStatus.setText("Status: there is no sale with the ID ");
            txtSaleClear();
        }
    }//GEN-LAST:event_btnSalesUpdateActionPerformed

    private void btnRentSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRentSearchActionPerformed
    {//GEN-HEADEREND:event_btnRentSearchActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_btnRentSearchActionPerformed

    private void btnProSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProSearchActionPerformed
    {//GEN-HEADEREND:event_btnProSearchActionPerformed
        Product pro = proCtl.findProduct(txtProSearch.getText());
        if (pro != null)
        {
            lblProStatus.setText("Status: Product was found");
            //Name
            txtProName.setText(pro.getName());
            //General
            txtProID.setText(pro.getId());
            lblProSalesPrice.setText("" + pro.Price());
            txtProRegPrice.setText("" + pro.getPrice());
            txtProDiscount.setText("" + pro.getSale());
            //Stock
            lblProByggemarked.setText("" + pro.locationQuantity(1));
            lblProTommerhandel.setText("" + pro.locationQuantity(2));
            lblProLeverandor.setText("" + pro.locationQuantity(3));
            lblProTotal.setText("" + pro.copies());
            txtProMinStock.setText("" + pro.getMinStock());
            if (pro.stockStatus() == false)
            {
                lblProStockstatus.setText("Stock is running low!");
            }
            else
            {
                lblProStockstatus.setText("");
            }
            //Rental
            txtProSerial.setText("");
            txtProRentPrice.setText("" + pro.getRentalPrice());
            txtProStatus.setText("");
            //Description
            txtProDesc.setText(pro.getDescription());
        }
        else
        {
            lblProStatus.setText("Status: there is no product with the ID ");
            txtProClear();
        }
    }//GEN-LAST:event_btnProSearchActionPerformed

    private void btnCusSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCusSearchActionPerformed
    {//GEN-HEADEREND:event_btnCusSearchActionPerformed
        Customer cus = assCtl.findCustomerID(txtCusSearch.getText());
        if (cus != null)
        {
            lblCusStatus.setText("Status: Customer was found");
            txtCusId.setText(cus.getId());
            txtCusName.setText(cus.getName());
            txtCusCompany.setText(cus.getCompany());
            txtCusAddress.setText(cus.getAddress());
            txtCusCredit.setText(("" + cus.getCredit()));
            txtCusDiscount.setText(("" + cus.getDiscount()));
        }
        else
        {
            lblCusStatus.setText("Status: there is no customer with the ID ");
            txtCusClear();
        }
    }//GEN-LAST:event_btnCusSearchActionPerformed

    private void btnSupSearchActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSupSearchActionPerformed
    {//GEN-HEADEREND:event_btnSupSearchActionPerformed
        Supplier sup = assCtl.findSupplierID(txtSupSearch.getText());
        if (sup != null)
        {
            lblSupStatus.setText("Status: Supplier was found");
            txtSupId.setText(sup.getId());
            txtSupName.setText(sup.getName());
            txtSupCompany.setText(sup.getCompany());
            txtSupAddress.setText(sup.getAddress());
        }
        else
        {
            lblSupStatus.setText("Status: there is no supplier with the ID ");
            txtSupClear();
        }
    }//GEN-LAST:event_btnSupSearchActionPerformed

    private void txtSupIdActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtSupIdActionPerformed
    {//GEN-HEADEREND:event_txtSupIdActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtSupIdActionPerformed

    private void btnSaleAddActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSaleAddActionPerformed
    {//GEN-HEADEREND:event_btnSaleAddActionPerformed
        if (!txtSalesItemId.getText().isEmpty() && !txtSaleQuan.getText().isEmpty())
        {
            String productID = txtSalesItemId.getText();
            int quantity = Integer.parseInt(txtSaleQuan.getText());
            tradeCtl.addSaleItem(productID, quantity, txtSaleID.getText());
            list1.add(proCtl.findProduct(productID).getName() + " x" + quantity);

            //Clear add item fields!
            txtSalesItemId.setText("");
            txtSaleQuan.setText("");
        }
    }//GEN-LAST:event_btnSaleAddActionPerformed

    private void txtProAddLeverandorActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txtProAddLeverandorActionPerformed
    {//GEN-HEADEREND:event_txtProAddLeverandorActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_txtProAddLeverandorActionPerformed

    private void btnProAddCancelActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProAddCancelActionPerformed
    {//GEN-HEADEREND:event_btnProAddCancelActionPerformed
        dialogProAdd.setVisible(false);
    }//GEN-LAST:event_btnProAddCancelActionPerformed

    private void btnProAddOkActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProAddOkActionPerformed
    {//GEN-HEADEREND:event_btnProAddOkActionPerformed
        Product pro = proCtl.findProduct(getProID());

        if (!txtProAddByggemarked.getText().isEmpty())
        {
            pro.addGoods(Integer.parseInt(txtProAddByggemarked.getText()), 1);
        }
        if (!txtProAddTommerhandel.getText().isEmpty())
        {
            pro.addGoods(Integer.parseInt(txtProAddTommerhandel.getText()), 2);
        }
        if (!txtProAddLeverandor.getText().isEmpty())
        {
            pro.addGoods(Integer.parseInt(txtProAddLeverandor.getText()), 3);
        }
        dialogProAdd.setVisible(false);

        btnProSearchActionPerformed(evt);
    }//GEN-LAST:event_btnProAddOkActionPerformed

    public String getProID()
    {
        return proID;
    }

    public void setProID(String proID)
    {
        this.proID = proID;
    }

    private void btnProMoveActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProMoveActionPerformed
    {//GEN-HEADEREND:event_btnProMoveActionPerformed
        setProID(txtProID.getText());
        Product pro = proCtl.findProduct(getProID());

        dialogProMove.setVisible(true);

        lblProMoveByggemarkedQuantity.setText("" + pro.locationQuantity(1));
        lblProMoveTommerhandelQuantity.setText("" + pro.locationQuantity(2));
        lblProMoveLeverandorQuantity.setText("" + pro.locationQuantity(3));
    }//GEN-LAST:event_btnProMoveActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_jButton1ActionPerformed
    {//GEN-HEADEREND:event_jButton1ActionPerformed
        setProID(txtProID.getText());

        dialogProAdd.setVisible(true);

        txtProAddByggemarked.setText("");
        txtProAddTommerhandel.setText("");
        txtProAddLeverandor.setText("");
    }//GEN-LAST:event_jButton1ActionPerformed

    private void dropProMoveFromActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_dropProMoveFromActionPerformed
    {//GEN-HEADEREND:event_dropProMoveFromActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_dropProMoveFromActionPerformed

    private void btnProMoveCancelActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProMoveCancelActionPerformed
    {//GEN-HEADEREND:event_btnProMoveCancelActionPerformed
        dialogProMove.setVisible(false);
    }//GEN-LAST:event_btnProMoveCancelActionPerformed

    private void btnProMoveOkActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnProMoveOkActionPerformed
    {//GEN-HEADEREND:event_btnProMoveOkActionPerformed
        Product pro = proCtl.findProduct(getProID());

        if (!txtProMoveQuantity.getText().isEmpty())
        {
            int quan = Integer.parseInt(txtProMoveQuantity.getText());
            int oldLoc = (dropProMoveFrom.getSelectedIndex() + 1);
            int newLoc = (dropProMoveTo.getSelectedIndex() + 1);

            pro.moveItem(quan, oldLoc, newLoc);
        }

        dialogProMove.setVisible(false);

        btnProSearchActionPerformed(evt);
    }//GEN-LAST:event_btnProMoveOkActionPerformed

    private void btnOrAddActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnOrAddActionPerformed
    {//GEN-HEADEREND:event_btnOrAddActionPerformed
        if (!txtOrItemId.getText().isEmpty() && !txtOrQuantity.getText().isEmpty())
        {
            String productID = txtOrItemId.getText();
            int quantity = Integer.parseInt(txtOrQuantity.getText());
            tradeCtl.addSaleItem(productID, quantity, txtOrID.getText());
            list2.add(proCtl.findProduct(productID).getName() + " x" + quantity);

            //Clear Add item fields!
            txtOrItemId.setText("");
            txtOrQuantity.setText("");

        }
    }//GEN-LAST:event_btnOrAddActionPerformed

    private void dropProMoveToActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_dropProMoveToActionPerformed
    {//GEN-HEADEREND:event_dropProMoveToActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_dropProMoveToActionPerformed

    public void txtEmpClear()
    {
        txtEmpID.setText("");
        txtEmpName.setText("");
        txtEmpDepart.setText("");
        txtEmpAddress.setText("");
    }

    private void txtSupClear()
    {
        txtSupId.setText("");
        txtSupName.setText("");
        txtSupCompany.setText("");
        txtSupAddress.setText("");
    }

    private void txtCusClear()
    {
        txtCusId.setText("");
        txtCusName.setText("");
        txtCusCompany.setText("");
        txtCusAddress.setText("");
        txtCusCredit.setText("");
        txtCusDiscount.setText("");
    }

    private void txtProClear()
    {
        //Name
        txtProName.setText("");
        //General
        txtProID.setText("");
        lblProSalesPrice.setText("");
        txtProRegPrice.setText("");
        txtProDiscount.setText("");
        //Stock
        lblProByggemarked.setText("");
        lblProTommerhandel.setText("");
        lblProLeverandor.setText("");
        lblProTotal.setText("");
        txtProMinStock.setText("");
        //Rental
        txtProSerial.setText("");
        txtProRentPrice.setText("");
        txtProStatus.setText("");
        //Description
        txtProDesc.setText("");
    }

    private void txtSaleClear()
    {
        txtSaleCusId.setText("");
        txtSaleEmpId.setText("");
        txtSaleID.setText("");
        txtSaleQuan.setText("");
        txtSalesItemId.setText("");
        list1.removeAll();
    }

    private void txtOrdClear()
    {
        txtOrID.setText("");
        txtOrCusId.setText("");
        txtOrEmpId.setText("");
        txtOrAddress.setText("");
        txtOrDate.setText("");
        list2.removeAll();
    }

//    private void setSaleList(String name)
//    {
//        listSale.addElement(name);
//        for (int i = 0; i < listSaleItems.getModel().getSize(); i++)
//        {
//            listSale.addElement(listSaleItems.getModel().getElementAt(i));
//        }
//        listSaleItems.setModel(listSale);
//        list1.
//    }

//    private void clearList()
//    {
//        ListModel model = listSaleItems.getModel();
//        for (int i = 0; i < model.getSize(); i++)
//        {
//            listSaleItems.remove(i);
//        }
//    }

    private static void addDefaultObjects()
    {
        //Associates
        assCtl.addCustomer("c1", "Test Customer", "Test address", "Test company", 0, 0);
        assCtl.addEmployee("e1", "Test employee", "Test address", "Test company");
        assCtl.addSupplier("s1", "Test supplier", "Test address", "Test company");

        //Product
        proCtl.addProduct("p1", "Test product", "This is a test product", 100, 50, 0, 50);
        proCtl.findProduct("p1").addGoods(10, 1);
        proCtl.addProduct("p2", "Hammer", "This is a test product", 150, 0, 0, 50);
        proCtl.findProduct("p2").addGoods(100, 1);

        //Trades
        tradeCtl.addOrder("o1", "2/2/2011", "Test Order", "e1", "c1");
        tradeCtl.addSaleItem("p1", 15, "o1");
        tradeCtl.addTrade("s1", "e1");
        tradeCtl.addSaleItem("p1", 10, "s1");
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String args[])
    {
        try
        {
            UIManager.setLookAndFeel(
                    UIManager.getSystemLookAndFeelClassName());
        }
        catch (UnsupportedLookAndFeelException e)
        {
            // handle exception
        }
        catch (ClassNotFoundException e)
        {
            // handle exception
        }
        catch (InstantiationException e)
        {
            // handle exception
        }
        catch (IllegalAccessException e)
        {
            // handle exception
        }

        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run()
            {
                new GUI().setVisible(true);
                addDefaultObjects();
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextField bliverændret;
    private javax.swing.JButton btnCusCreate;
    private javax.swing.JButton btnCusDelete;
    private javax.swing.JButton btnCusSearch;
    private javax.swing.JButton btnCusUpdate;
    private javax.swing.JButton btnEmpCreate;
    private javax.swing.JButton btnEmpDelete;
    private javax.swing.JButton btnEmpSearch;
    private javax.swing.JButton btnEmpUpdate;
    private javax.swing.JButton btnItemAdd;
    private javax.swing.JButton btnOrAdd;
    private javax.swing.JButton btnOrCreate;
    private javax.swing.JButton btnOrDelete;
    private javax.swing.JButton btnOrPrint;
    private javax.swing.JButton btnOrSearch;
    private javax.swing.JButton btnOrUpdate;
    private javax.swing.JButton btnProAddCancel;
    private javax.swing.JButton btnProAddOk;
    private javax.swing.JButton btnProCreate;
    private javax.swing.JButton btnProDelete;
    private javax.swing.JButton btnProMove;
    private javax.swing.JButton btnProMoveCancel;
    private javax.swing.JButton btnProMoveOk;
    private javax.swing.JButton btnProSearch;
    private javax.swing.JButton btnProUpdate;
    private javax.swing.JButton btnRentCreate;
    private javax.swing.JButton btnRentDelete;
    private javax.swing.JButton btnRentPrint;
    private javax.swing.JButton btnRentSearch;
    private javax.swing.JButton btnRentUpdate;
    private javax.swing.JButton btnSaleAdd;
    private javax.swing.JButton btnSalesCreate;
    private javax.swing.JButton btnSalesDelete;
    private javax.swing.JButton btnSalesPrint;
    private javax.swing.JButton btnSalesSearch;
    private javax.swing.JButton btnSalesUpdate;
    private javax.swing.JButton btnSupCreate;
    private javax.swing.JButton btnSupDelete;
    private javax.swing.JButton btnSupSearch;
    private javax.swing.JButton btnSupUpdate;
    private javax.swing.JDialog dialogAbout;
    private javax.swing.JDialog dialogProAdd;
    private javax.swing.JDialog dialogProMove;
    private javax.swing.JComboBox dropProMoveFrom;
    private javax.swing.JComboBox dropProMoveTo;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton8;
    private javax.swing.JButton jButton9;
    private javax.swing.JInternalFrame jInternalFrame1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel20;
    private javax.swing.JLabel jLabel21;
    private javax.swing.JLabel jLabel22;
    private javax.swing.JLabel jLabel23;
    private javax.swing.JLabel jLabel24;
    private javax.swing.JLabel jLabel25;
    private javax.swing.JLabel jLabel26;
    private javax.swing.JLabel jLabel27;
    private javax.swing.JLabel jLabel28;
    private javax.swing.JLabel jLabel29;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel30;
    private javax.swing.JLabel jLabel31;
    private javax.swing.JLabel jLabel32;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JLabel jLabel42;
    private javax.swing.JLabel jLabel43;
    private javax.swing.JLabel jLabel44;
    private javax.swing.JLabel jLabel45;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel50;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JOptionPane jOptionPane1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel62;
    private javax.swing.JPanel jPanel63;
    private javax.swing.JPanel jPanel64;
    private javax.swing.JPanel jPanel65;
    private javax.swing.JPanel jPanel66;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JLabel lblCusStatus;
    private javax.swing.JLabel lblEmpStatus;
    private javax.swing.JLabel lblOrStatus;
    private javax.swing.JLabel lblProAddByggemarked;
    private javax.swing.JLabel lblProAddHeader;
    private javax.swing.JLabel lblProAddLeverandor;
    private javax.swing.JLabel lblProAddTommerhandel;
    private javax.swing.JLabel lblProByggemarked;
    private javax.swing.JLabel lblProLeverandor;
    private javax.swing.JLabel lblProMoveByggemarked;
    private javax.swing.JLabel lblProMoveByggemarkedQuantity;
    private javax.swing.JLabel lblProMoveFrom;
    private javax.swing.JLabel lblProMoveLeverandor;
    private javax.swing.JLabel lblProMoveLeverandorQuantity;
    private javax.swing.JLabel lblProMoveQuantity;
    private javax.swing.JLabel lblProMoveTo;
    private javax.swing.JLabel lblProMoveTommerhandel;
    private javax.swing.JLabel lblProMoveTommerhandelQuantity;
    private javax.swing.JLabel lblProSalesPrice;
    private javax.swing.JLabel lblProStatus;
    private javax.swing.JLabel lblProStockstatus;
    private javax.swing.JLabel lblProTommerhandel;
    private javax.swing.JLabel lblProTotal;
    private javax.swing.JLabel lblRentStatus;
    private javax.swing.JLabel lblSalesStatus;
    private javax.swing.JLabel lblSupStatus;
    private java.awt.List list1;
    private java.awt.List list2;
    private javax.swing.JMenuItem menuAbout;
    private javax.swing.JMenu menuBar;
    private javax.swing.JMenuItem menuExit;
    private javax.swing.JMenuItem menuHelp;
    private javax.swing.JTextField txtCusAddress;
    private javax.swing.JTextField txtCusCompany;
    private javax.swing.JTextField txtCusCredit;
    private javax.swing.JTextField txtCusDiscount;
    private javax.swing.JTextField txtCusId;
    private javax.swing.JTextField txtCusName;
    private javax.swing.JTextField txtCusSearch;
    private javax.swing.JTextField txtEmpAddress;
    private javax.swing.JTextField txtEmpDepart;
    private javax.swing.JTextField txtEmpID;
    private javax.swing.JTextField txtEmpName;
    private javax.swing.JTextField txtEmpSearch;
    private javax.swing.JTextField txtItemId;
    private javax.swing.JTextField txtOrAddress;
    private javax.swing.JTextField txtOrCusId;
    private javax.swing.JTextField txtOrDate;
    private javax.swing.JTextField txtOrEmpId;
    private javax.swing.JTextField txtOrFind;
    private javax.swing.JTextField txtOrID;
    private javax.swing.JTextField txtOrItemId;
    private javax.swing.JTextField txtOrQuantity;
    private javax.swing.JTextField txtProAddByggemarked;
    private javax.swing.JTextField txtProAddLeverandor;
    private javax.swing.JTextField txtProAddTommerhandel;
    private javax.swing.JTextArea txtProDesc;
    private javax.swing.JTextField txtProDiscount;
    private javax.swing.JTextField txtProID;
    private javax.swing.JTextField txtProMinStock;
    private javax.swing.JTextField txtProMoveQuantity;
    private javax.swing.JTextField txtProName;
    private javax.swing.JTextField txtProRegPrice;
    private javax.swing.JTextField txtProRentPrice;
    private javax.swing.JTextField txtProSearch;
    private javax.swing.JTextField txtProSerial;
    private javax.swing.JTextField txtProStatus;
    private javax.swing.JTextField txtRentAddress;
    private javax.swing.JTextField txtRentCusId;
    private javax.swing.JTextField txtRentDate;
    private javax.swing.JTextField txtRentEmpId;
    private javax.swing.JTextField txtRentFromDate;
    private javax.swing.JTextField txtRentRentalPrice;
    private javax.swing.JTextField txtRentSearch;
    private javax.swing.JTextField txtRentToDate;
    private javax.swing.JTextField txtSaleCusId;
    private javax.swing.JTextField txtSaleEmpId;
    private javax.swing.JTextField txtSaleFind;
    private javax.swing.JTextField txtSaleID;
    private javax.swing.JTextField txtSaleQuan;
    private javax.swing.JTextField txtSalesItemId;
    private javax.swing.JTextField txtSupAddress;
    private javax.swing.JTextField txtSupCompany;
    private javax.swing.JTextField txtSupId;
    private javax.swing.JTextField txtSupName;
    private javax.swing.JTextField txtSupSearch;
    // End of variables declaration//GEN-END:variables
}
